cmake_minimum_required(VERSION 3.8)
project(motor_driver)

include_directories(
  include
  ${Boost_INCLUDE_DIRS}
)
aux_source_directory(src SRC_LISTS)

# find dependencies
find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
find_package(std_msgs REQUIRED)
find_package(sensor_msgs REQUIRED)

# 创建可执行文件
add_executable(motor_driver src/motor_driver.cpp src/serial.cpp)
ament_target_dependencies(motor_driver rclcpp std_msgs sensor_msgs)
# 安装可执行文件
install(TARGETS
  motor_driver
  DESTINATION lib/${PROJECT_NAME})
  
install(DIRECTORY launch config
  DESTINATION share/${PROJECT_NAME}
)  
ament_package()
